<div ng-controller="WmsCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <form name="itemForm" novalidate>
        <ul class="sui-breadcrumb">
            <li><a href="#/wms/list">{{'仓库'| translate}}</a></li>
            <li class="active">{{wms.wms_id?'edit':'add_new' | translate}}</li>
        </ul>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'商户企业备案编码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.sh_code" name="sh_code" type="text" value="" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'商户企业备案名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.sh_name" name="sh_name" type="text" value="" class="input-xlarge" required>
            </div>
        </div>
       
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'选择关区'| translate}}：</label>
            <div class="controls">
                <customs-type ng-model="wms.customs">
                </customs-type>{{wms.customs}}
            </div>
        </div>
        
        <!--  <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'选择报关类型'| translate}}：</label>
            <div class="controls">
                <pay-type ng-model="wms.paytype"></pay-type>
            </div>
        </div> -->
        <div class="control-group" >
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'选择关区平台'| translate}}：</label>
            <div class="controls">
                <customs-code ng-model="wms.api.pingtai">
                </customs-code>{{wms.api.pingtai}}
            </div>
        </div>
         <div class="control-group" >
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'选择通关口岸'| translate}}：</label>
            <div class="controls">
                <port-code ng-model="wms.api.CUSTOMS_CODE">
                </port-code>{{wms.api.CUSTOMS_CODE}}
            </div>
        </div>
         <div class="control-group" >
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'银联商户号'| translate}}：</label>
            <div class="controls">
                 <input ng-model="wms.api.shanghuhao" name="zhongduanhao" type="text" class="input-xlarge" >
            </div>
        </div>
         <div class="control-group" >
            <label class="control-label v-top" style="width: 200px;">{{'银联终端号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.zhongduanhao" name="zhongduanhao" type="text" class="input-xlarge" >
            </div>
        </div>
        <div class="control-group" >
            <label class="control-label v-top" style="width: 200px;">{{'电商平台域名'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.InternetDomainName" name="InternetDomainName" type="text" class="input-xlarge" >
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库企业备案编码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.code" name="code" type="text" value="" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库企业备案名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.name" name="name" type="text" value="" class="input-xlarge" required>
                <div ng-show="itemForm.name.$dirty && itemForm.name.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库类型'| translate}}：</label>
            <div class="controls">
                <wms-type ng-model="wms.type" name="type"></wms-type>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao' || wms.type == 'WmsQianFeng' || wms.type == 'WmsZhiTong' || wms.type == 'WmsHuanghua' ">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'加签选择'| translate}}：</label>
            <div class="controls">
                <sign-type ng-model="wms.api.signType" name="signType"></sign-type>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <!--自行加签-->
        <div class="control-group" ng-show="wms.api.signType == '2'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'Ukey509数据串'| translate}}：</label>
            <div class="controls">
                <textarea rows="3" ng-model="wms.api.ukey" name="ukey" class="input-xlarge" ></textarea>
            </div>
        </div>

        <!--重庆佩米仓-->
        <div class="control-group" ng-show="wms.type == 'Wmspeimi' ">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'是否直邮'| translate}}：</label>
            <div class="controls">
                <is-dire ng-model="wms.api.isDire" name="isDire"></is-dire>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <!--自行加签-->
        <div class="control-group" ng-show="wms.api.isDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'慧眼购APPID'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.hygAppid" name="hygAppid" type="text" class="input-xlarge" >
            </div>
        </div>
        <div class="control-group" ng-show="wms.api.isDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'慧眼购AppKey'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.hygAppKey" name="hygAppKey" type="text" class="input-xlarge" >
            </div>
        </div>

        <!--松岛仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsSongDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库渠道号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.orgId" name="orgId" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库用户名'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.username" name="username" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库密码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.password" name="password" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库key'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.key" name="key" type="text" class="input-xlarge ">
            </div>
        </div>

        <!--乾丰仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsQianFeng'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'乾丰仓库ID'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.app_id" name="app_id" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQianFeng'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'乾丰仓库秘钥'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.app_secret" name="app_secret" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQianFeng'">
            <label class="control-label v-top" style="width: 200px;">{{'渠道名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.ChannelId" name="ChannelId" type="text" class="input-xlarge ">
                <div class="sui-msg msg-tips msg-default msg-clear help-block">
                    <div class="msg-con">
                        乾丰提示：商品维护上如果维护了渠道名称，该字段就为维护的渠道名称。
                    </div>
                </div>
            </div>
        </div>

        <!--致通仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsZhiTong'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'快递方式选择'| translate}}：</label>
            <div class="controls">
                <ship-type ng-model="wms.api.shipType" name="shipType"></ship-type>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>

        <!--青岛仓库配置申通直邮-->
        <div class="control-group" ng-show="wms.type == 'WmsQingDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'申通直邮'| translate}}：</label>
            <div class="controls">
                <sto-dire ng-model="wms.api.stoDire" name="stoDire"></sto-dire>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQingDao' && wms.api.stoDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'申通直邮账号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.StoUserName" name="StoUserName" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQingDao' && wms.api.stoDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'申通直邮秘钥'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.StoPass" name="StoPass" type="text" class="input-xlarge ">
            </div>
        </div>

        <!--青岛仓库配置青岛直邮-->
        <div class="control-group" ng-show="wms.type == 'WmsQingDao'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'青岛直邮'| translate}}：</label>
            <div class="controls">
                <qd-dire ng-model="wms.api.QingDaoDire" name="QingDaoDire"></qd-dire>
                <div ng-show="itemForm.api.$dirty && itemForm.api.$invalid" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQingDao' && wms.api.QingDaoDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'青岛直邮合约号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.ContractNo" name="ContractNo" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQingDao' && wms.api.QingDaoDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'青岛直邮账号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.QdUserName" name="QdUserName" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsQingDao' && wms.api.QingDaoDire == '1'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'青岛直邮秘钥'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.QdPass" name="QdPass" type="text" class="input-xlarge ">
            </div>
        </div>

        <!--郑州仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsZhengZhou'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'申报企业国检代码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.agentCodeCiq" name="agentCodeCiq" type="text" value="" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsZhengZhou'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'申报企业海关代码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.agentCodeCus" name="agentCodeCus" type="text" value="" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsZhengZhou'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'企业编号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.CompanyCode" name="CompanyCode" type="text" value="" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsZhengZhou'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'账册编号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.emsNo" name="emsNo" type="text" value="" class="input-xlarge">
            </div>
        </div>

        <!--成都仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsChengDu'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'商户号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.merchant_code" name="merchant_code" type="text" value="" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsChengDu'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'秘钥'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.chengDuKey" name="chengDuKey" type="text" value="" class="input-xlarge">
            </div>
        </div>

        <!--组合仓库配置-->
        <div class="control-group" ng-show="wms.type == 'WmsQianFeng' || wms.type == 'WmsZhiTong' ">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库编码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.StockSysNo" name="StockSysNo" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao' || wms.type == 'WmsQianFeng' || wms.type == 'WmsZhiTong' || wms.type=='WmsQingDao' || wms.type=='WmsZhengZhou' || wms.type == 'WmsHuanghua'  || wms.type == 'WmsChengDu' ">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'DXPID'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.dxp_id" name="dxp_id" type="text" value="" class="input-xlarge">
            </div>
        </div>
        <div class="control-group" ng-show="wms.type == 'WmsSongDao' || wms.type == 'WmsQianFeng' || wms.type == 'WmsZhengZhou'">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'公钥信息'| translate}}：</label>
            <div class="controls">
                <textarea rows="3" ng-model="wms.api.publicKey" name="publicKey" class="input-xlarge" ></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'推送仓库api地址'| translate}}：</label>
            <div class="controls">
                <textarea rows="3" ng-model="wms.api.url" name="url" class="input-xlarge" required></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库账号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.appkey" name="appkey" type="text" class="input-xlarge " required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'仓库密钥'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.secret" name="secret" type="text" class="input-xlarge " required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'分拣线'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.SORTLINE_ID" name="SORTLINE_ID" type="text" class="input-xlarge" required>
            </div>
        </div>
       <!--  <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'关区代码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.CUSTOMS_CODE" name="CUSTOMS_CODE" type="text" class="input-xlarge " required>
            </div>
        </div> -->
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'收款账号'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.recpAccount" name="recpAccount" type="text" class="input-xlarge ">
                <div class="sui-msg msg-tips msg-default msg-clear help-block">
                    <div class="msg-con">
                        交易商品的卖方商户账号。电商平台自营商户应填写自营商户的收款账户；非自营电商应填写非自营商户的收款账户。
                    </div>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'收款企业代码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.recpCode" name="recpCode" type="text" class="input-xlarge ">
                <div class="sui-msg msg-tips msg-default msg-clear help-block">
                    <div class="msg-con">
                        应填写收款企业代码（境内企业为统一社会信用代码；境外企业可不填写）
                    </div>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'收款企业名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.recpName" name="recpName" type="text" class="input-xlarge ">
                <div class="sui-msg msg-tips msg-default msg-clear help-block">
                    <div class="msg-con">
                        填写收款企业名称
                    </div>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'网站商品链接 '| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.itemLink" name="itemLink" type="text" class="input-xlarge ">
                <div class="sui-msg msg-tips msg-default msg-clear help-block">
                    <div class="msg-con">
                        网站链接格式说明： https://www.abc.com/?itemid=[itemid]
                    </div>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'IC操作员卡密码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.icpasswd" name="icpasswd" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'平台企业代码'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.EBP_CODE" name="EBP_CODE" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'平台企业名称'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.EBP_NAME" name="EBP_NAME" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'179账号：'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.hgRealDataSignUser" name="hgRealDataSignUser" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top" style="width: 200px;"><b style="color: #f00;">*</b>{{'179密码：'| translate}}：</label>
            <div class="controls">
                <input ng-model="wms.api.hgRealDataSignPwd" name="hgRealDataSignPwd" type="text" class="input-xlarge ">
            </div>
        </div>
        <div class="control-group ">
            <label class="control-label " style="width: 200px; "></label>
            <div class="controls ">
                <button type="submit " id="submit " class="sui-btn btn-primary " ng-disabled="!itemForm.$valid " ng-click="wsmAdd($event) ">
                    <span>{{'save' | translate}}</span>
                </button>
            </div>
        </div>
    </form>
</div>